﻿// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. 
// See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace ListOfLists_WPF
{
    /// <summary>
    /// Interaction logic for ListNameDialog.xaml
    /// </summary>
    public partial class ListNameDialog : Window
    {
        public string ListName { get; set; }
        public ListNameDialog()
        {
            ListName = null;
            InitializeComponent();
        }

        private void buttonOK_Click(object sender, RoutedEventArgs e)
        {
            var name = this.textBoxName.Text;
            if (!String.IsNullOrWhiteSpace(name))
            {
                ListName = name;
            }
            this.Close();
        }

        private void buttonCancel_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
